package com.alex.controller;

import common.beans.ResultBean;
import common.beans.User;
import common.util.UserUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "登录获取用户信息")
@RestController
@RequestMapping("/user")
public class UserController {


    @Operation(summary = "登录获取用户信息", description = "进页面先走一个loading,访问该接口")
    @GetMapping("/user")
    public ResultBean<Object> user() {
        System.out.println("获取用户信息___");
        User user = UserUtil.getUserUnloginDeniey();
        return new ResultBean<>(user);
    }
}
